package com.company.restaurant.dto;

import java.io.Serializable;

/**
 * Description of class.
 * Created 3/26/14 5:01 PM
 *
 * @author andrey.rodin@playtech.com
 */

public abstract class BaseMessage implements Serializable {

    private final int code;
    private final String token;

    protected BaseMessage(int code, String token) {
        this.code = code;
        this.token = token;
    }

    public int getCode() {
        return code;
    }

    public String getToken() {
        return token;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();
        sb.append("BaseMessage");
        sb.append("{code=").append(code);
        sb.append(", token='").append(token).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
